 function checkStrong(sPW){ 
  if (sPW.length<=4){
   Modes=1; 
  }else if(sPW.length<=13){
   Modes=2;
  }else{
   Modes = 0;
  }
  return Modes; 
 } 

 function pwStrength(pwd){ 
	var pwd = document.getElementById("pwd").value;
	var fun = "pwd";
	if(pwd==''){
		alert("密码不能为空")
	}else{
		$.ajax({
			async:false,
			type:'POST',
			url:'__APP__/Register/index',
			data:'pwd='+pwd+"&fun="+fun,
			success:function(msg){
				
			}
		});

	}
				O_color="#eeeeee"; 
				L_color="#FF0000"; 
				M_color="#FF9900"; 
				H_color="#33CC00"; 
				if (pwd==null||pwd==""){ 
				Lcolor=Mcolor=Hcolor=O_color; 
				} else{ 
				S_level=checkStrong(pwd); 
				switch(S_level) { 
				case 0: 
				Lcolor=Mcolor=Hcolor=L_color; 
				break;
				case 1: 
				Lcolor=L_color; 
				Mcolor=Hcolor=O_color; 
				break; 
				case 2:
				Lcolor=Mcolor=L_color;
				Hcolor=O_color;
				break;
				default: 
				Lcolor=Mcolor=Hcolor=H_color; 
				break;		
  } 
  
  document.getElementById("strength_L").style.backgroundColor=Lcolor;
  document.getElementById("strength_M").style.backgroundColor=Mcolor;
  document.getElementById("strength_H").style.backgroundColor=Hcolor;
  /*
  document.t1.strength_L.style.backgroud=Lcolor; 
  document.t1.strength_M.style.backgroud=Mcolor; 
  document.t1.strength_H.style.backgroud=Hcolor; 
  */
  } 
 }

